import sys
import test01
# 定义类
class MyClass:
    i = 10

    def __init__(self, num):
        self.i = num
        self.m = num

    def speak(self):
        print(self.i)
        print("m的值为",self.m)

    def ptr(self):
        print(self)
        print(self.__class__)


# 创建对象
class SonClass(MyClass):

    def __init__(self, x, y, z):
        MyClass.__init__(self,10)
        self.x = x
        self.y = y
        self.z = z
    def speak(self):
        print(self.x)
        print(self.y)
        print(self.z)
    def __ptr(self):
        print("测试私有方法能否在类外被调用")



var2 = MyClass(10)
var2.speak()
var2.ptr()
var3 = SonClass(10, 20, 30)
var3.speak()
# var3.__ptr()
knights = {"nihao":"cesjo", "xuexi": "长大"}
for k, v in knights.items():
    print(k+" "+v)
print(sys.path)
x = test01.hello
x()
print(x)


# if name == "__main__":
#
if __name__ == "__main__":
    print("哈哈哈哈")